Open
Conversation
Install and export the geometry-central target as a CMake package so downstream projects can use find_package(GeometryCentral CONFIG) without a custom FindGeometryCentral.cmake module. Also split the build and install interfaces so the exported target does not depend on this project's local helper targets, while installed consumers still inherit Eigen transitively.
Install the vendored headers referenced by public geometry-central headers so the install tree is self-contained. This removes the need for downstream post-install copy steps for happly.h and nanort/nanort.h.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR makes the installed
geometry-centralpackage self-contained for downstream CMake and Nix consumers.It removes the need for:
FindGeometryCentral.cmake/Findgeometry-central.cmakefilespostInstallcopy steps for vendored headersThe changes are intentionally small and split into two logical commits:
What Changed
1. Export an installable CMake package
This PR teaches
geometry-centralto install a standard CMake config package under:lib/cmake/GeometryCentral/GeometryCentralConfig.cmakelib/cmake/GeometryCentral/GeometryCentralTargets.cmakeThat allows downstream projects to use:
without providing a custom
FindGeometryCentral.cmake.To make the export work cleanly, the target interface was adjusted so the installed package does not depend on this repository's local helper targets from
deps/, while installed consumers still inheritEigen3::Eigentransitively.2. Install bundled public dependency headers
Some installed public headers currently reference vendored headers that were not being installed.
This PR installs the missing public dependency headers:
happly.hnanort/nanort.hso the install tree is usable without downstream
postInstallcopy steps.Why
Before this PR, downstream packaging needed extra repository-specific fixes.
In Nix, a working derivation required:
FindGeometryCentral.cmake/Findgeometry-central.cmakefiles$out/includeinpostInstallAfter this PR, those workarounds are no longer needed.
Verification
The changes were verified with:
A real
nix buildof the package using:-DGC_ALWAYS_DOWNLOAD_EIGEN=OFF-DGC_EIGEN_LOCATION=.../include/eigen3-DSUITESPARSE=OFFInspection of the install tree to confirm it now contains:
lib/libgeometry-central.*lib/cmake/GeometryCentral/GeometryCentralConfig.cmakelib/cmake/GeometryCentral/GeometryCentralTargets.cmakeinclude/happly.hinclude/nanort/nanort.hA downstream smoke test that successfully configured and built with:
find_package(GeometryCentral REQUIRED CONFIG)target_link_libraries(... geometry-central::geometry-central)Notes
pkg-configfiles.geometry-central.